<!DOCTYPE html>
<html class="no-js" ng-app="test"><!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <title></title>
    <meta content="width=device-width" name="viewport">

    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link href="/dist/release/ui-grid.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
    <!--<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>-->
    <script src="/lib/test/angular/1.3.16/angular.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.0/ui-bootstrap-tpls.min.js"></script>
    <script src="/dist/release/ui-grid.js"></script>

    <style>
        body {
            padding: 60px;
            min-height: 600px;
        }
        .grid {
            width: 100%;
            height: 400px;
        }
        .placeholder {
            height: 50%;
            width: 50%;
            border: 3px solid black;
            background: #ccc;
        }
    </style>
</head>
<body ng-controller="Main">
<!-- <h1>Test</h1> -->

<!-- <div class="row main"> -->
<h2>Grid</h2>

<tabset>
    <tab heading="One">
        <div ui-grid="gridOptions" class="grid"></div>
    </tab>
    <tab heading="Two">
        <div ui-grid="gridOptions2" class="grid"></div>
    </tab>
</tabset>
<!-- <div class="placeholder"> -->
<!-- </div> -->

<br>
<br>

<script>
    var app = angular.module('test', ['ui.grid', 'ui.bootstrap']);
    app.controller('Main', function($scope, $http) {
        $scope.gridOptions = {};
        $scope.gridOptions.columnDefs = [
            { name:'id', width:50 },
            { name:'name', width:100, pinnedLeft:true },
            { name:'age', width:100, pinnedRight:true  },
            { name:'address.street', width:150  },
            { name:'address.city', width:150 },
            { name:'address.state', width:50 },
            { name:'address.zip', width:50 },
            { name:'company', width:100 },
            { name:'email', width:100 },
            { name:'phone', width:200 },
            { name:'about', width:300 },
            { name:'friends[0].name', displayName:'1st friend', width:150 },
            { name:'friends[1].name', displayName:'2nd friend', width:150 },
            { name:'friends[2].name', displayName:'3rd friend', width:150 }
        ];

        $scope.gridOptions2 = {};
        $scope.gridOptions2.columnDefs = [
            { name:'id' },
            { name:'name' },
            { name:'age' }
        ];

        $http.get('https://rawgit.com/angular-ui/ui-grid.info/gh-pages/data/500_complex.json')
                .success(function(data) {
                    $scope.gridOptions.data = data;
                    $scope.gridOptions2.data = data;
                });
    });
</script>
</body>
</html>

